<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAppUserMsgTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('user_msg', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('user_id')->nullable()->comment('用户id');
			$table->integer('msg_id')->nullable()->comment('消息id');
			$table->boolean('status')->comment('状态 1未读 2已读 3已删除');
			$table->dateTime('create_time')->nullable();
			$table->dateTime('update_time')->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('app_user_msg');
	}

}
